package com.sport.apis.annocation;

import lombok.Data;
import lombok.Getter;

import java.lang.annotation.*;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SportStatus {

    /**
     * 状态校验
     * @return
     */
    InnerStatus sportTargetStatus() default InnerStatus.INITIAL_SPORT_MEETING;

    @Getter
    enum InnerStatus {

        INITIAL_SPORT_MEETING(0, "初始化运动会！"),

        ORGANIZE_SPORT_MEETING(1, "创建中运动会！"),

        TERMINATE_SPORT_MEETING(2, "结束后运动会！");

        private String message;

        private Integer indexStatus;

        InnerStatus(Integer indexStatus, String message) {
            this.message = message;
            this.indexStatus = indexStatus;
        }
    }
}
